// ex7_12_3.cpp
#include <iostream>

void set_array(int arr[], int n, int val);
int main(void)
{
    using namespace std;
    int arr[4];
    set_array(arr, 4, 3);
    for (int i = 0; i < 4; i++)
    {
        cout << arr[i] << endl;
    }
}

void set_array(int arr[], int n, int val)
{
    int *ptr = arr;
    for (int i = 0; i < n; i++)
    {
        ptr[i] = val;
    }
}
